import React from 'react'
import classNames from 'classnames'
import * as PropTypes from 'prop-types'

const Icon = (props) => {
	const {
		type,
		...others
	} = props
	if (!type) {
		return null
	}

	return (
		<i className={classNames('iconfont', `icon-` + type)} {...others}></i>
	)
}
Icon.propTypes = {
	type: PropTypes.string
}

export default Icon